package com.sg.controller.bff;

import com.sg.service.biz.bff.StatisticalDataService;
import com.sg.dto.biz.bff.req.BffQueryDeptPostStaffNumListReqDto;
import com.sg.dto.biz.bff.req.BffQueryOrgDeptPositionStaffNumListReqDto;
import com.sg.dto.biz.bff.req.BffQueryOrgPostRankStaffNumListReqDto;
import com.sg.dto.biz.bff.req.BffQueryPostRankStaffNumListReqDto;
import com.sg.dto.biz.bff.res.BffQueryDeptPostStaffNumListRespDto;
import com.sg.dto.biz.bff.res.BffQueryOrgDeptPositionStaffNumListRespDto;
import com.sg.dto.biz.bff.res.BffQueryOrgPostRankStaffNumListRespDto;
import com.sg.dto.biz.bff.res.BffQueryPostRankStaffNumListRespDto;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "StatisticalData", tags = {"StatisticalData"})
@RestController
// @RequestMapping("/oms/statisticalData/")
public class StatisticalDataController {

    @Autowired
    StatisticalDataService statisticalDataService;

    /**
     * B1-3查询岗位或职级编制数（管理）
     * gen by moon at 8/10/2022, 3:37:16 AM
     */
    @PostMapping("/oms/mgt/statisticalData/queryPostRankStaffNumList")
    @ApiOperation(value = "B1-3查询岗位或职级编制数（管理）", response = OkrResult.class)
    public OkrResult<BffQueryPostRankStaffNumListRespDto> queryPostRankStaffNumList(@RequestBody(required = false) @Validated BffQueryPostRankStaffNumListReqDto reqDTO) {
        return OkrResult.success(statisticalDataService.queryPostRankStaffNumList(reqDTO));
    }

    /**
     * B1-3组织部门职务编制数（管理）
     * gen by moon at 8/10/2022, 3:37:23 AM
     */
    @PostMapping("/oms/mgt/statisticalData/queryOrgDeptPositionStaffNumList")
    @ApiOperation(value = "B1-3组织部门职务编制数（管理）", response = OkrResult.class)
    public OkrResult<BffQueryOrgDeptPositionStaffNumListRespDto> queryOrgDeptPositionStaffNumList(@RequestBody(required = false) @Validated BffQueryOrgDeptPositionStaffNumListReqDto reqDTO) {
        return OkrResult.success(statisticalDataService.queryOrgDeptPositionStaffNumList(reqDTO));
    }

    /**
     * B1-3查询部门岗位编制数（管理）
     * gen by moon at 8/10/2022, 3:37:22 AM
     */
    @PostMapping("/oms/mgt/statisticalData/queryDeptPostStaffNumList")
    @ApiOperation(value = "B1-3查询部门岗位编制数（管理）", response = OkrResult.class)
    public OkrResult<BffQueryDeptPostStaffNumListRespDto> queryDeptPostStaffNumList(@RequestBody(required = false) @Validated BffQueryDeptPostStaffNumListReqDto reqDTO) {
        return OkrResult.success(statisticalDataService.queryDeptPostStaffNumList(reqDTO));
    }

    /**
     * B1-3查询组织岗位或职级编制数（管理）
     * gen by moon at 8/10/2022, 3:37:21 AM
     */
    @PostMapping("/oms/mgt/statisticalData/queryOrgPostRankStaffNumList")
    @ApiOperation(value = "B1-3查询组织岗位或职级编制数（管理）", response = OkrResult.class)
    public OkrResult<BffQueryOrgPostRankStaffNumListRespDto> queryOrgPostRankStaffNumList(@RequestBody(required = false) @Validated BffQueryOrgPostRankStaffNumListReqDto reqDTO) {
        return OkrResult.success(statisticalDataService.queryOrgPostRankStaffNumList(reqDTO));
    }
}
